﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace DreamWork.Model.ViewModel
{
    public enum MetaDataType
    {
        /// <summary>
        /// 文本
        /// </summary>
        Text = 1,
        /// <summary>
        /// 数字
        /// </summary>
        Number = 2,
        /// <summary>
        /// 状态
        /// </summary>
        Status = 3,
        /// <summary>
        /// 日期
        /// </summary>
        Date = 4,
        /// <summary>
        /// 列表
        /// </summary>
        List = 5,
        /// <summary>
        /// 树
        /// 
        /// </summary>
        Tree = 6,
        /// <summary>
        /// 是否
        /// </summary>
        Boolean = 7,
        Time = 8,
        Table = 9,
        SubData = 10,
        File = 11,
        Image = 12

    }
    public class MetaData
    {
        /// <summary>
        /// 名称
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 界面Label
        /// </summary>
        public string Label { get; set; }
        /// <summary>
        /// 数据类型
        /// </summary>
        public string DataType { get; set; }
        public int? FieldOrder { get; set; } = 0;
        public bool IsKey { get; set; } = false;
        public bool IsVisibale { get; set; } = true;
        public IEnumerable<MetaData> Children { get; set; } 
    }
}
